package com.caiwen.util;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class BCryptUtils {

    /**
     * 对密码进行 bcrypt格式加密
     * @param password
     * @return
     */
    public static String getBcryptPassword(String password){
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        return bCryptPasswordEncoder.encode(password);
    }


    public static void main(String[] args){
        String pass = getBcryptPassword("123");
        System.out.println(pass);
    }
}
